<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.staticfile.net/jquery/1.10.2/jquery.min.js"></script>
</head>
<body>
    <h1>欢迎XXX登录</h1>

    <script>
        var user = localStorage.getItem("user");
        if(user){
            $("h1").text("欢迎"+user+"登录");
        }
    </script>
</body>
</html>